﻿Tile Eater 1.0.1
Documentation - What you’ve all been waiting for!
by Trent Trautman aka SoulEater

•What it is:
Tile Eater is simply, a tool to edit NES (Nintendo Entertainment System) ROM files.  More specifically, it is a NES CHR editor.  What is CHR you say? Read on!  This is too complicated you say?  Read on!  How will you learn if you don’t read?

•An Explanation of a NES ROM:
A NES ROM is divided into 3 sections.  These sections are:
1) The Header
2) PRG data
3) CHR data

Section One is where information (like the ROM mapper, PRG size, etc.) in the ROM is stored.  I have written an editor for this section called iNESmode, but it will soon be obsolete with the release of iNES 0.7. 

Section Two is the PRG data.  This data is the “program data”, it is where the instructions for the NES CPU are stored.  Currently there are no editors available for this section of the ROM (with one crude exception, Mario Improvement). 

Section Three is the CHR data.  Think of CHR as graphical data for the rom.  This is where about 99.9% of the graphical data is stored in a NES ROM.  I’ve only seen one exception to this (the 0.1%), which was a hack to allow the artists use more than the 4 color limit in SuperMario2. TileEater is designed to edit section 2 of a NES ROM file.

•An Explanation of CHR:
As stated above, the CHR is the graphic data in a NES ROM/game.  This data is divided into Banks.  Banks consist of 512 tiles.  What is a tile?  A tile is a an 8x8 graphic with a 4 color palette.  Pretty simple stuff on the surface actually.  What TileEater does, is take wonderful stuff like this:

1ˆüÔˇﬁ˛.Œ ‚ Ó|  
8D“ ***„¿∏<<   

And converts/edits it into a viewable form fit for “human” consumption.

•So how do I hack ROM’s?:
Very carefully of course!!!  Patience is required.  TileEater’s editor is much like any other pixel editing program for the Mac.  If you don’t know how to point and click in this day and age you are definitely in trouble.

•Can you give me an example of how to hack I rom. I don’t get it.
I hate lamers who don’t bother to ever figure anything out for themselves, but since this is the documentation, OK.

1) First of all, launch TileEater
2) Load your SuperMario 3 NES rom...it was quite possibly THE most popular game for the NES.
3)Use the “up” arrow key, or the buttons in the bank window to take you to Bank 16.
4)Using your mouse, click on the tile just above the “o” in “Mario”.  This is tile 7802.
5)Click on the dark grey color.
6)Draw an “S” in this tile.
7)Using the “left” arrow key or your mouse, move to tile 7803.
8)Click on the “save” button in the dialog that will come up.
9)Draw an “ou” in this tile.
10)Move to tile 7804.
11)Save your progress of course.
12)Draw an “l” in this tile.  Using the mouse select “Save” under the “File” menu.
13)Quit TileEater.
14)Launch iNES (or any other NES emulator...HECK! Load it up on your NES if you know how!), and watch for the results in the title screen.  That’s what we just edited if you hadn’t figured it out!
15)This concludes our Tile Hacking using TileEater 101 class.

•Is there some way I can edit a LARGE section of the ROM at once?
YES!  That’s what the import/export options are for!!!  They allow you to export an entire bank of data to a PICT file.  You can then edit it to your hearts content and import it all back into TileEater when you’re done.  But remember NES CHR is NOT picture data...regardless of the nice options I spend hours and hours of my free time writing.  You CAN only have 4 colors! Period.  No whining!  It is a limitation of the NES hardware.  If you try and use more than that things will get screwed up.  Please see the section below for information on importing and exporting using different colors.

•What's with this bottom row of pixels when I export a PICT from TileEater?
I thought you'd ask that!  Ok...first of all NES graphical data (CHR) is absolutely nothing like a PICT format.  NES CHR is limited to 4 colors...that's it.  Sorry you can't have any more.  So, when copying, pasting, importing and exporting TileEater uses the bottom row of pixels to know which colors to map from a PICT to a NES CHR tile.  Get all that?

Let me explain more: 

Lets say your using a multi-colored graphic of Mario.  Mario is white, blue, red, and green (it's an example OK).  Now, when you paste this picture into a graphic editor (like graphic converter), on the bottom row of pixels, there is a palette.  Actually, it is more of a list of colors so TileEater knows how to interpret the data correctly.  The first pixel is color 1, next color 2, and so on.  Any pixels after the fourth pixel are ignored by TileEater.  So, if your colors of mario don't "map" right, say his face is blue instead of green when you run the ROM, merely place a green pixel into the spot where the blue was, and the blue where the green was...the colors will be mapped into CHR slightly differently.  

Get all that?

•What's with this color palette editing option?

It allows you to edit specific color palettes in NES ROMS.  This is a new and HIGHLY beta addition to TileEater.
First of all to find the specific palette you'll NEED ines0.7.  Start up holding down the "option" key.  You will see a Special menu.  Load a NES rom and start playing till the point where you want to change colors.  Get the palette information from iNES.  The required info that TileEater needs is a 8 character string, taken from a ROW of colors in iNES Such as, 0F0F1126.  Enter that info into TileEater and it will search through the rom until it find it (if it finds it).  The rest is all point and click.  Good luck.


•How do you use the workspaces?

Its really quite simple.  Just click on the import or import (+) button to place tiles into the work area.  Then arrange them however you like.  Simple drag and drop kinda stuff.  A load and save option is available, as well as a single delete, and a delete (+) option which deletes all tiles in the workspace.

•In some ROMs why is there lots of garbage?
1.  It is a poorly dumped ROM.  Not my fault.
2.  As of TileEater 1.0.1, you can edit ROMs with no CHR data.  Meaning instead of editing the CHR your editing the PRG data.  What looks like data is actually NES program code.  A good rule of thumb:if it doesn't look like its a graphic from the game...DON'T EDIT IT.  You can seriously destroy your roms if you mess with the PRG portion of the rom.